<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        body{
            height: 2000px;
        }
    </style>
    <script src="./BOM.js"></script>
</head>

<body>
    <h1>Lorem ipsum dolor sit amet.</h1>
    <button onclick="alert('这是内嵌js')">click me</button>
    <button id="btn" style="position: absolute;top: 500px;">再跳转</button>
    <script>
        console.log('hello ECMAScript!');

        let btn = document.getElementById('btn');
        btn.onclick=function(){
            location.assign('window.html')
        }
    </script>
</body>

</html>